package dujiu.luogu.branch;

import java.util.Scanner;

public class P1046 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.nextLine();
        String[] split = s.split(" ");
        int height = scanner.nextInt();
        int[] arr = new int[10];
        int count = 0;
        for (int i = 0; i < split.length; i++) {
            arr[i] = Integer.parseInt(split[i]);
            if (arr[i] <= height+30){
                count++;
            }
        }
        System.out.println(count);
        // System.out.println(Arrays.toString(arr));
    }
}
